from django.db import models
from projectManage.models import Project
# Create your models here.


class Cases(models.Model):

    title = models.CharField(max_length=50)
    pre_condition = models.CharField(max_length=50)
    primary_module = models.CharField(max_length=50, null=True)
    sub_module = models.CharField(max_length=50, null=True)
    case_steps = models.CharField(max_length=200)
    creator = models.CharField(max_length=20)
    create_time = models.DateTimeField(auto_created=True)
    case_level = models.IntegerField(default=0)
    expect_result = models.CharField(max_length=50)
    real_result = models.CharField(max_length=50, blank=True)
    remarks = models.CharField(max_length=100, blank=True)
    page = models.CharField(max_length=50, blank=True)
    project = models.ForeignKey(Project, on_delete=models.CASCADE)

    def __str__(self):
        return self.title
